package com.example.chatgptapplication.controller.admin;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.example.chatgptapplication.entity.SysOperLog;
import com.example.chatgptapplication.utils.ResponseData;
import com.example.chatgptapplication.enums.ResponseStatus;
import com.example.chatgptapplication.service.SysOperLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/sysOper")
public class SysOperLogController {


    @Autowired
    private SysOperLogService sysOperLogService;

    @RequestMapping("/listSysOper")
    public ResponseData listSysOperLog(@RequestBody SysOperLog sysOperLog){
        Page<SysOperLog> page = sysOperLogService.getSysOperLog(sysOperLog);
        return new ResponseData(ResponseStatus.SUCCESS.getCode(), ResponseStatus.SUCCESS.getMessage(), page);
    }
}
